
Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		data: '',
		http: getApp().globalData.map},

	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: function(options) {
		wx.getStorage({
			key:'uid',
			success: (e) => {
				wx.request({
					url: getApp().globalData.http + 'action=getOrderDetail&oid='+options.id+'&l=3&uid='+e.data.uid,
					success: (e) => {
						console.log(e)
						this.setData({
							data: e.data.data,
							id:options.id
						})
					}
				})
			}
		})
	},
	wl(){
		  wx.showToast({
		      title: '物流单号：'+this.data.data.express_code+'已复制',
		    })
		    wx.setClipboardData({
		      data: this.data.data.express_code,
		      success: function (res) {
		        wx.getClipboardData({   
		          success: function (res) {
		            console.log(res.data) 
		          }
		        })
		      }
		    })
	}
})
